<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var a=parseInt(prompt("请输入第一个数"));
    var b=parseInt(prompt("请输入第二个数"));
    if (a>b){
        alert("最大值："+a);
    }else {
        alert("最大值："+b);
    }

</script>
</body>
</html>